using Digitalmes.Domain.Entities.Mes.Masters;
using Digitalmes.Domain.Entities.Mes.Processes;

namespace Digitalmes.Application.Services;

/// <summary>
/// 工站查询服务。
/// </summary>
public interface IWorkstationQueryService : IApplicationService
{
    /// <summary>
    /// 查询工站信息。
    /// </summary>
    /// <param name="lineCode">产线编号</param>
    /// <param name="workstationCode">工站编号</param>
    /// <returns></returns>
    Task<MdWorkstation?> GetWorkstationAsync(string lineCode, string workstationCode);

    /// <summary>
    /// 查询工位归属的工序信息。
    /// </summary>
    /// <remarks>需确保在同一条产线上同一工位只属于同一工序。</remarks>
    /// <param name="lineCode">产线编号</param>
    /// <param name="workstationCode">工站编号</param>
    /// <returns></returns>
    Task<(ProcOperation?, MdWorkstation?)> GetOperationAsync(string lineCode, string workstationCode);
}
